<?php

namespace Apps\Common\Models;

/**
 * 分店Model(B端表)
 * @author     chenxiaolin
 * @date        2016年1月19日
 * @version     2.0.0
 * @copyright   Copyright 2016 meelier.com
 */
class Branch extends \PhalconPlus\Database\Model
{

    /**
     *
     * @var integer
     */
    public $branch_id;

    /**
     *
     * @var string
     */
    public $branch_name;

    /**
     *
     * @var string
     */
    public $remarks;

    /**
     *
     * @var integer
     */
    public $shop_id;

    /**
     *
     * @var integer
     */
    public $create_time;

    /**
     *
     * @var string
     */
    public $real_name;

    /**
     *
     * @var integer
     */
    public $status;

    /**
     *
     * @var string
     */
    public $shop_uid;

    /**
     *
     * @var string
     */
    public $expire_date;
	public $long_time;
	public $start_time;
    public $end_time;
    public $agent_name;
    public $agent_id;
    /**
     * Returns table name mapped in the model.
     *
     * @return string
     */
    public function getSource()
    {
        return 'cos_branch';
    }

    /**
     * Allows to query a set of records that match the specified conditions
     *
     * @param mixed $parameters
     * @return BeautyParlor[]
     */
    public static function find($parameters = null)
    {
        return parent::find($parameters);
    }

    /**
     * Allows to query the first record that match the specified conditions
     *
     * @param mixed $parameters
     * @return BeautyParlor
     */
    public static function findFirst($parameters = null)
    {
        return parent::findFirst($parameters);
    }

    /**
     * Independent Column Mapping.
     * Keys are the real names in the table and the values their names in the application
     *
     * @return array
     */
    public function columnMap()
    {
        return array(
            'branch_id' => 'branch_id',
            'branch_name' => 'branch_name',
            'remarks' => 'remarks',
            'shop_id' => 'shop_id',
            'create_time' => 'create_time',
            'real_name' => 'real_name',
            'status' => 'status',
            'shop_uid' => 'shop_uid',
            'expire_date' => 'expire_date',
        	'long_time'=>'long_time',
        	'start_time'=>'start_time',
        	'end_time'=>'end_time',
            'agent_name'=>'agent_name',
            'agent_id'=>'agent_id'
        );
    }


}
